package cn.analysys.dao.ad;

import cn.analysys.model.BehaviorDict;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Map;

/**
 * mybatis 数据库连接
 * @author jiangbang
 * @date 2017/4/17
 */

@Mapper
public interface BehaviorDictMapper {

    @Select("select * from 4a_behavior_dict where dict_name = #{name}")
    BehaviorDict findByName(@Param("name") String name);

    @Update("update 4a_behavior_dict set dict_name = #{name,jdbcType=VARCHAR} where dict_code = #{dictCode,jdbcType=INTEGER}")
    int update(@Param("name") String name, @Param("dictCode") Integer dictCode);

//    @Update("update 4a_behavior_dict set dict_name = #{name,jdbcType=VARCHAR} where dict_code = #{dictCode,jdbcType=INTEGER}")
//    int update2(Map<String, Object> map);
//
//    @Update("update 4a_behavior_dict set dict_name = #{name,jdbcType=VARCHAR} where dict_code = #{dictCode,jdbcType=INTEGER}")
//    int update3(BehaviorDict behaviorDict);


}
